package com.ruoyi.demo.zbus;

import com.ruoyi.demo.domain.Todo;
import com.ruoyi.demo.service.ITodoService;
import io.zbus.rpc.RpcClient;

/**
 * ruoyi
 * Description: //TODO
 *
 * @author lucas <link>mailto:lucas.shao@foxmail.com</link>
 * @since 2019-06-17
 */
public class RpcClientAgent {
	private RpcClient rpcClient = new RpcClient("192.168.0.241:15555");
	private ITodoService todoService = rpcClient.createProxy("/", ITodoService.class);

	public static void main(String[] args) {
		RpcClientAgent rpcClientAgent = new RpcClientAgent();
		Todo todo = rpcClientAgent.todoService.selectTodoById((long) 2);
		System.out.println(todo);
	}
}
